package a.f.g.a;

import a.c.e;
import a.f.g.a.a.a;
import a.f.g.a.a.c;
import a.f.g.a.a.h;

import java.util.List;

class l
  implements nc
{
  private b_ b;
  private c_ c = new c_(null);
  private e_ d = new e_(null);
  private d_ e = new d_(null);
  private int f = 2;
  private double g;
  private ic h;
  private double i = 0.5D;
  private double j = 0.8D;
  
  public l()
  {
    this(new ic());
  }
  
  public l(ic paramic)
  {
    this.h = paramic;
  }
  
  public y a(cb paramcb, bb parambb, f paramf)
  {
    a(parambb);
    this.g = parambb.i();
    this.b.a(paramcb, parambb, paramf);
    return paramf;
  }
  
  private void a(bb parambb)
  {
    if (!xb.r) {
      if (parambb.c() < this.i)
      {
        this.b = this.c;
        return;
      }
    }
    if (parambb.c() < this.j)
    {
      this.b = this.d;
      return;
    }
    this.b = this.e;
  }
  
  public int a()
  {
    return this.f;
  }
  
  public void a(int paramInt)
  {
    this.f = paramInt;
  }
  
  public double b()
  {
    return this.j;
  }
  
  public void a(double paramDouble)
  {
    this.j = paramDouble;
  }
  
  public double c()
  {
    return this.i;
  }
  
  public void b(double paramDouble)
  {
    this.i = paramDouble;
  }
  
  private class d_
    extends l.b_
  {
    private d_()
    {
      super(null);
    }
    
    protected void f()
    {
      l.this.h.a(this.g, this.h, this.i);
    }
    
    d_(l.0 param0)
    {
      this();
    }
  }
  
  private class e_
    extends l.b_
  {
    private e_()
    {
      super(null);
    }
    
    protected void f()
    {
      a();
      b();
      d();
    }
    
    e_(l.0 param0)
    {
      this();
    }
  }
  
  private class c_
    extends l.b_
  {
    private c_()
    {
      super(null);
    }
    
    protected void f()
    {
      a();
      e();
    }
    
    c_(l.0 param0)
    {
      this();
    }
  }
  
  private abstract class b_
  {
    protected a a;
    protected h c;
    protected y d;
    protected lb e;
    protected cb g;
    protected bb h;
    protected f i;
    private double j;
    
    private b_() {}
    
    void a(cb paramcb, bb parambb, f paramf)
    {
      this.g = paramcb;
      this.h = parambb;
      this.i = paramf;
      this.j = paramcb.l();
      this.d = paramcb.a();
      this.e = parambb.d();
      this.c = s.a(this.e);
      this.a = this.c.a(this.d.d(), this.d.f());
      f();
    }
    
    void a()
    {
      a.c.bb localbb = new a.c.bb(this.a.a().l());
      localbb.remove(this.g.p());
      a(localbb);
    }
    
    void b()
    {
      int m = xb.q;
      List localList = this.c.b(this.a);
      int k = 0;
      do
      {
        if (k >= localList.size()) {
          break;
        }
        c localc = (c)localList.get(k);
        a(localc.a());
        k++;
      } while (m == 0);
    }
    
    void a(List paramList)
    {
      int m = xb.q;
      int k = 0;
      do
      {
        if (k >= paramList.size()) {
          break;
        }
        e locale = (e)paramList.get(k);
        cb localcb = a(locale);
        a(localcb);
        k++;
      } while (m == 0);
    }
    
    void a(cb paramcb)
    {
      if (!xb.r) {
        if (paramcb.q()) {
          return;
        }
      }
      y localy = paramcb.a();
      double d1 = this.d.d() - localy.d();
      double d2 = this.d.f() - localy.f();
      double d3 = this.d.g() - localy.g();
      a(d1, d2, d3, paramcb.l(), 1);
    }
    
    void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, int paramInt)
    {
      double d1 = Math.sqrt(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2 + paramDouble3 * paramDouble3);
      if (!xb.r) {
        if (d1 == 0.0D) {
          return;
        }
      }
      double d2 = d1 - (this.j + paramDouble4);
      d2 = Math.max(d2, 0.001D);
      double d3 = paramInt * k.a(l.this.g / d2, l.this.f) / d1;
      this.i.a(paramDouble1 * d3, paramDouble2 * d3, paramDouble3 * d3);
    }
    
    void c()
    {
      int m = xb.q;
      List localList = this.c.a(this.a);
      int k = 0;
      do
      {
        if (k >= localList.size()) {
          break;
        }
        c localc = (c)localList.get(k);
        a(localc.a());
        k++;
      } while (m == 0);
    }
    
    void d()
    {
      boolean bool = xb.r;
      int m = xb.q;
      List localList = this.c.a(this.a);
      int k = 0;
      label85:
      do
      {
        if (k >= localList.size()) {
          break;
        }
        c localc = (c)localList.get(k);
        if (!bool)
        {
          if (localc.o() > localc.j()) {
            a(localc.a());
          }
        }
        else
        {
          if (bool) {
            continue;
          }
          if (m == 0) {
            break label85;
          }
        }
        a(localc);
        k++;
      } while (m == 0);
    }
    
    private void a(c paramc)
    {
      if (paramc.l() == 0) {
        return;
      }
      double d1 = this.d.d() - paramc.f();
      double d2 = this.d.f() - paramc.h();
      double d3 = this.d.g() - paramc.p();
      a(d1, d2, d3, 15.0D, paramc.l());
    }
    
    void e()
    {
      boolean bool = xb.r;
      int n = xb.q;
      a[][] arrayOfa = this.c.e();
      int k = 0;
      label93:
      label95:
      do
      {
        if (k >= arrayOfa.length) {
          break;
        }
        a[] arrayOfa1 = arrayOfa[k];
        int m = 0;
        do
        {
          if (m >= arrayOfa1.length) {
            break;
          }
          c localc = (c)arrayOfa1[m];
          if (bool) {
            break label95;
          }
          if (n != 0) {
            break label93;
          }
          if (localc != this.a) {
            a(localc);
          }
          m++;
        } while (n == 0);
        if (!bool) {
          k++;
        }
      } while (n == 0);
    }
    
    cb a(e parame)
    {
      return this.e.a(parame);
    }
    
    protected abstract void f();
    
    b_(l.0 param0)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.g.a.l

 * JD-Core Version:    0.7.0.1

 */